<?php

namespace app\validate;

use think\Validate;

class MemberValidate extends Validate
{
    protected $rule = [
        'id'         => 'require|number',
        'projectId'  => 'require|number',
        // 'name'    => 'require|max:50',
    ];

    protected $message = [
        'id.require'        => 'id 不能为空',
        'id.number'         => 'id 必须是数字',
        'projectId.require' => 'projectId 不能为空',
        'projectId.number'  => 'projectId 必须是数字',
    ];

    protected $scene = [
        'members'   => ['projectId'],
        'verify'    => ['id'],
    ];
}
